.settings {
  padding: 10px;
}

.settings__items {
  padding: 0 20px;
  margin-bottom: 149px;
}

.settings__ramble {
  margin: 0;
  padding: 0;
  white-space: pre-wrap;
  margin-bottom: 15px;
}

.settings__row {
  margin-bottom: 40px;

  & input[type="text"],
  & select {
    font-size: 1.4rem;
    width: 80%;
  }
}

.settings__row-title{
  border-bottom: solid grey 1px;
}

.settings__text-input-and-save {
  display: flex;
  gap: 10px;
}

.settings__info {
  background-color: var(--info-colour);
  width: calc(100% + 20px);
  max-height: fit-content;
  justify-self: flex-end;
  text-align: left;
  padding: 0 20px;
  box-sizing: border-box;
  margin-left: -10px;
  position: fixed;
  bottom: 0;
}

.settings__checkbox{
  font-size: 1.25rem;
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid grey;
  border-radius: 5px;
  justify-content: space-between;
  padding: 10px;
  width: 80%;

  & input {
    transform: scale(1.2, 1.2);
  }
}

.settings__checkbox:not(:last-child){
  margin-block-end: 15px;
}


.settings__patreon-keys-list {
  list-style: none;
  flex-wrap: wrap;
  display: flex;
  gap: 12px;
  padding-block-start: 12px;
}

.settings__patreon-keys-list-item {
  --size: 55px;

  overflow: hidden;
  border-radius: 100px;
  display: block;
  width: var(--size);
  height: var(--size);
  position: relative;

  &::after {
    content: "";
    opacity: 1;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
  }

  img {
    width: var(--size);
    height: var(--size);
  }
}

@property --percent {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.settings__patreon-keys-list-item--in-progress {
  &::after {
    content: "";
    display: flex;
    justify-content: center;
    align-items: center;
    animation: conic-spin 1s infinite linear;
    background: conic-gradient(from var(--percent), rgb(0 0 0 / 75%), transparent);
  }
}

.settings__patreon-keys-list-item--valid {
  &::after {
    content: "✓";
    font-size: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgb(0 128 0 / 50%);
  }
}

.settings__patreon-keys-list-item--invalid {
  &::after {
    content: "❌";
    font-size: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgb(128 0 0 / 50%);
  }
}

.settings__patreon-keys-list-item--downloading {
  &::after {
    --degrees: calc(var(--download-percent) * 360deg);
    --green: rgb(0 128 0 / 50%);

    content: "";
    background: conic-gradient(var(--green), var(--green) var(--degrees), transparent calc(var(--degrees) + 1deg));

  }
}

@keyframes conic-spin {
  0% {
    --percent: 0deg;
  }

  100% {
    --percent: 360deg;
  }
}

.settings__items-input-list{
  background-color: var(--light-colour);
  padding: 10px;
  border-radius: 5px;
  list-style: none;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 20px;
}

.settings__items-input-item{
  background-color: var(--info-colour);
  padding: 5px 10px;
  border-radius: inherit;
  display: flex;
  cursor: pointer;

  &:hover{
    transform: scale(1.05);
  }

  &::after{
    content: "x";
    font-family: monospace;
    font-size: 1.1rem;
    margin-inline-start: 5px;
  }
}

.settings__progress-bar{
  width: 80%;
}
